
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 0791
 * @Author : WangRuoyu 
 * @Date : 2023/9/13 15:35
 */

#include "iostream"
#include "vector"

using namespace std;

vector<int> add(vector<int> &a, vector<int> &b) {
    vector<int> c;

    int n = max(a.size(), b.size());
    int t = 0;
    for (int i = 0; i < n; ++i) {
        if (i < a.size()) t += a[i];
        if (i < b.size()) t += b[i];
        c.push_back(t % 10);
        t /= 10;
    }
    if (t) c.push_back(t);

    return c;
}

int main() {
    string a, b;
    vector<int> A, B;
    cin >> a >> b;
    for (int i = a.size() - 1; i >= 0; --i) {
        A.push_back(a[i] - '0');
    }
    for (int i = b.size() - 1; i >= 0; --i) {
        B.push_back(b[i] - '0');
    }

    vector<int> c = add(A, B);

    for (int i = c.size() - 1; i >= 0; --i) {
        printf("%d", c[i]);
    }

    return 0;
}